﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Chaos.view.board
{
    /// <summary>
    /// Interaction logic for victorypointtrack.xaml
    /// </summary>
    public partial class victorypointtrack : UserControl
    {
        public victorypointtrack()
        {
            InitializeComponent();          
        }

        private void victorypointtrack_control_Loaded(object sender, RoutedEventArgs e)
        {
            model.victorypointtrack vt = DataContext as model.victorypointtrack;

            if (vt != null)
            {
                foreach (model.victorypointmarker vm in vt.Victorypointmarkers)
                {
                    vm.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(victorypointmarker_PropertyChanged);
                    victorypointmarker ui = new victorypointmarker();
                    ui.DataContext = vm;

                    victorypointslot vs = victorypoint_grid.Children[vm.Score] as victorypointslot;
                    vs.Slots.Add(ui);
                }
            }

        }

        void victorypointmarker_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            throw new NotImplementedException();
        }



    }
}
